﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public enum GameScene {
    Global,
    Start,
    Shelter,
    Battle,
}

public enum Language {
    Chinese,
    English,
}

public enum Resolution {
    _1920x1080,
    _1600x900,
    _1440x810,
    _1200x675,
}

public enum Direction {
    Up,
    Right,
    Down,
    Left,
}

[System.Serializable]
public class Config {
    public Language language;
    public Resolution resolution;
    public int allVolume;
    public int musicVolume;
    public int soundVolume;
    public bool mute;
    public bool fullScreen;
    public Config() {
        language = Language.Chinese;
        resolution = Resolution._1920x1080;
        allVolume = 70;
        musicVolume = 70;
        soundVolume = 70;
        mute = false;
        fullScreen = true;
    }

    public Config Clone() {
        Config newConfig = new Config();
        newConfig.language = language;
        newConfig.resolution = resolution;
        newConfig.allVolume = allVolume;
        newConfig.musicVolume = musicVolume;
        newConfig.soundVolume = soundVolume;
        newConfig.mute = mute;
        newConfig.fullScreen = fullScreen;
        return newConfig;
    }
}

public static class GlobalData {

    public static float loadingStartTime = 0.5f;
    public static float loadingEndTime = 0.5f;

    public static Vector2Int sortingLayersSize = new Vector2Int(10, 10);
    public static AsyncOperation sceneLoadingAsync;
    public static GameScene nowGameScene;
    //public static SceneSwitch sceneSwitch;
    public static bool loading;
    public static SceneState sceneState;
    public static Config config = new Config();

    public static string AssetBundlePath {//AB包地址
        get {
            return Application.streamingAssetsPath;
        }

    }

    //======================配置表读取内容===========//
    public static List<RoleData> roleDatas = new List<RoleData>();          //角色配置

}
